package tothreedesignmodel.interpreter;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author lzhphantom
 * @description
 * @date 创建于 9:55 2020/8/2
 * @modified
 */
@AllArgsConstructor
@Data
public class AndExpression implements Expression {
    private Expression city;
    private Expression person;
    @Override
    public boolean interpret(String info) {
        String[] s = info.split("的");
        return city.interpret(s[0])&&person.interpret(s[1]);

    }
}
